/**
 * File upload related types
 */

export type UploadStatus = 'idle' | 'uploading' | 'success' | 'error';

export interface UploadedFile {
  id: string;
  name: string;
  type: string;
  size: number;
  content: string | object;
  uploadedAt: string;
}

export interface ValidationError {
  field: string;
  message: string;
  code: string;
}

export interface FileUploadState {
  packageJsonFile: File | null;
  routerConfigFile: File | null;
  packageJsonContent: object | null;
  routerConfigContent: object | null;
  uploadStatus: UploadStatus;
  validationErrors: ValidationError[];
  uploadedFiles: UploadedFile[];
  uploadProgress: number;
  isAnalyzed: boolean;
  analysisResult: object | null;
}

export interface FileAnalysis {
  dependencies: string[];
  devDependencies: string[];
  routes: any[];
  components: string[];
  entryPoints: string[];
  issues: ValidationError[];
}